//统一管理咱们项目品牌类目相关的接口
import request from "@/utils/request"
//项目品牌相关的请求地址
const API = {
  PRODUCT_BRAND_CATEGORY_LIST_URL: "/super/systemProductBrandCategory/list",
  PRODUCT_BRAND_CATEGORY_STATUS_URL: "/super/systemProductBrandCategory/statusChange",
  PRODUCT_BRAND_CATEGORY_DETAIL_URL: "/super/systemProductBrandCategory/detail",
  PRODUCT_BRAND_CATEGORY_ADD_URL: "/super/systemProductBrandCategory/add",
  PRODUCT_BRAND_CATEGORY_EDIT_URL: "/super/systemProductBrandCategory/edit",
  PRODUCT_BRAND_CATEGORY_DEL_URL: "/super/systemProductBrandCategory/del",
}

//获取品牌类目列表
export const list = (params) =>
  request.get(API.PRODUCT_BRAND_CATEGORY_LIST_URL, { params })

//修改品牌类目状态
export const statusChange = (data) =>
  request.post(API.PRODUCT_BRAND_CATEGORY_STATUS_URL, data)

//获取品牌类目详情
export const detail = (params) =>
  request.get(API.PRODUCT_BRAND_CATEGORY_DETAIL_URL, { params })

//添加品牌类目
export const create = (data) =>
  request.post(API.PRODUCT_BRAND_CATEGORY_ADD_URL, data)

//修改品牌类目
export const update = (data) =>
  request.post(API.PRODUCT_BRAND_CATEGORY_EDIT_URL, data)

//删除品牌类目
export const destroy = (data) =>
  request.post(API.PRODUCT_BRAND_CATEGORY_DEL_URL, data)
